package com.syc.legou.search.service.controller;

import com.syc.legou.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/search")
public class SerchController {
    @Autowired
    private SearchService searchService;

    @RequestMapping
    public Map<String,Object> search(@RequestBody Map<String,String> searchMap){
        return searchService.search(searchMap);
    }
}
